﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PersonResume.Master"
    Inherits="System.Web.Mvc.ViewPage<FzWeb.Models.Person_WillJob>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ResumeWillJob
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="../../Scripts/class.js" type="text/javascript"></script>

    <script src="../../Scripts/areaSelecter.js" type="text/javascript"></script>

    <script src="../../Scripts/jobSelecter.js" type="text/javascript"></script>

    <script src="../../Scripts/industrySelecter.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function() {
        showOption();
        salaryChange();

    });
    function showOption() {
        if ($("input[id='jobtype2'][type='checkbox']").attr("checked")) {
            $("#partLocation").show();
            $("#partTime").show();
        }
        else {
            $("#partLocation").hide();
            $("#partTime").hide();
        }
    }
    function salaryChange() {
        if ($("#PartTimeSalaryUnit").val() == "面谈") {
            $("#PartTimeSalary").val("");
            $("#PartTimeSalary").attr("readonly", true);
        }
        else {
            $("#PartTimeSalary").attr("readonly", false);
        }
    }

    function checkJobType() {
        if (!$("#jobtype1").attr("checked") && !$("#jobtype2").attr("checked") && !$("#jobtype3").attr("checked")) {
            alert("请选择期望工作性质!")
            return false;
        }
        if ($("#PartTimeSalaryUnit").val() != "面谈" && $("#PartTimeSalary").val()=="") {
            alert("请选择期望薪酬!");
            return false;
        }
        
    }

</script>
    <% using (Html.BeginForm("ResumeWillJob", "person", FormMethod.Post, new { @class = "form", onsubmit="return checkJobType()" }))
       { %>
       
    <div class="leftinfo">
        <div class="tempter">
            <div class="nrkuan">
                <div class="title jlinfos">
                    <div class="nameinfo">
                        <div class="edits">
                            <span class="names names2">求职意向</span> <span><a id="HyperLink1" href="<%= Url.Action("PreviewResume","person") %>"
                                target="_blank">预览</a></span>
                        </div>
                    </div>
                </div>
                <div class="modifileinfo">
                    <div>
                        <span class="start">*</span> <span class="names">期望工作性质：</span> <span><span id="jobType">
                            <%=Html.CheckBox("jobtype1",string.IsNullOrEmpty(Model.JobType)?false:Convert.ToBoolean(Model.JobType.Split(',')[0]))%>全职
                            <%=Html.CheckBox("jobtype2", string.IsNullOrEmpty(Model.JobType) ? false : Convert.ToBoolean(Model.JobType.Split(',')[1]), new { onclick="showOption()" })%>兼职
                            <%=Html.CheckBox("jobtype3", string.IsNullOrEmpty(Model.JobType) ? false : Convert.ToBoolean(Model.JobType.Split(',')[2]))%>实习
                        </span></span><span></span>
                    </div>
                    <div>
                        <span class="start">*</span> <span class="names">工作地区：</span> <span class="inptexxt">
                            <span id="jobLocation">
                                <%= Html.TextBox("Location", Model.Location, new { style = "width: 450px;height: 18px;", @class = "required" })%>
                                <span id="jobLocation_rfvbtnSel" class="validstyle" style="color: Red; display: none;">
                                    请选择工作地区</span><input type="hidden" id="jobLocation_hfProvinceID" />
                                <input type="hidden" id="LocationId" name="LocationId" value="<%= Model.LocationId %>" />

                                <script type="text/javascript">
                                    var jobLocation_btnSel = document.getElementById("Location");
                                    var jobLocation_hfProvinceID = document.getElementById("jobLocation_hfProvinceID");
                                    var jobLocation_hfCityID = document.getElementById("LocationId");
                                    //areaSelecter.init(jobLocation_btnSel, jobLocation_hfProvinceID, jobLocation_hfCityID);
                                    jobLocation_btnSel.onfocus = function() { areaSelecter.show(jobLocation_btnSel, jobLocation_hfProvinceID, jobLocation_hfCityID, true); }
                                </script>

                            </span></span><span class="errortips"></span>
                    </div>
                    <div>
                        <span class="start">*</span> <span class="names">期望行业：</span> <span class="inptexxt">
                            <span id="SearcherEditor1_calling"><span class="inptexxt">
                                <%= Html.TextBox("VocationName", Model.VocationName, new { style = "width: 450px;height: 18px;", @class = "required" })%>
                            </span><span id="SearcherEditor1_calling_rfvbtnSel" class="validstyle" style="color: Red;
                                display: none;"></span>
                                <input type="hidden" name="VocationId" id="VocationId" value="<%= Model.VocationId %>" />

                                <script type="text/javascript">
                                    var SearcherEditor1_calling_btnSel = document.getElementById("VocationName");
                                    var SearcherEditor1_calling_hfIndustryID = document.getElementById("VocationId");
                                    //indSelecter.init(SearcherEditor1_calling_btnSel, SearcherEditor1_calling_hfIndustryID);
                                    SearcherEditor1_calling_btnSel.onfocus = function() { indSelecter.show(SearcherEditor1_calling_btnSel, SearcherEditor1_calling_hfIndustryID); }
                                </script>

                            </span></span><span class="errortips"></span>
                    </div>
                    <div>
                        <span class="start">*</span> <span class="names">期望岗位：</span><span id="Span1"> <span
                            class="inptexxt">
                            <%= Html.TextBox("PostClassName", Model.PostClassName, new { style = "width: 450px;height: 18px;", @class = "required" })%></span></span>
                        <span id="rfvbtnSel" class="validstyle" style="color: Red; display: none;"></span>
                        <input type="hidden" name="jobFunction$hfClassID" id="hfClassID" />
                        <input type="hidden" name="PostClassId" id="PostClassId" value="<%= Model.PostClassId %>" />

                        <script type="text/javascript">
                            var btnSel = document.getElementById("PostClassName");
                            var hfClassID = document.getElementById("hfClassID");
                            var hfClassDetailID = document.getElementById("PostClassId");
                            //jobSelecter.init(btnSel, hfClassID, hfClassDetailID);
                            btnSel.onfocus = function() { jobSelecter.show(btnSel, hfClassID, hfClassDetailID, true); }
                        </script>

                    </div>
                    <div id="partLocation">
                        <span class="nostart"></span><span class="names">工作地段：</span> <span class="inptexxt">
                            <%=Html.TextBox("PartTimeLocation", Model.PartTimeLocation)%>
                        </span>(限兼职)</div>
                    <div id="partTime">
                        <span class="nostart"></span><span class="names">工作时段：</span> <span class="inptexxt">
                            <%=Html.TextBox("PartWorkTime", Model.PartWorkTime)%>
                        </span>(限兼职)</div>
                    
                    <div>
                        <span class="start">*</span> <span class="names">期望薪酬：</span> <span class="inptexxt">
                            <%=Html.TextBox("PartTimeSalary", Model.PartTimeSalary, new { @class = "digits" })%>
                            <%= Html.DropDownList("PartTimeSalaryUnit", ViewData["PTSUnit"] as SelectList,  new { onchange="salaryChange()" })%>
                        </span>
                    </div>
                <div>
                    <span class="nostart"></span><span class="names">其它要求：</span> <span class="inptexxt">
                        <%=Html.TextBox("Others", Model.Others)%>
                    </span>
                </div>
                <div>
                    <span class="start">*</span> <span class="names">到职时间：</span> <span class="inptexxt">
                        <%= Html.DropDownList("ArriveTime", ViewData["ArriveT"] as SelectList, new { @class = "required" })%>
                    </span>
                </div>
                <div class="pinjia">
                    <span class="nostart"></span><span class="pj">备注信息：</span> <span class="inptexxt inptexxt2">
                        <%= Html.TextArea("DevelopmentDirection", Model.DevelopmentDirection, new { style = "width: 350px;height: 60px" })%>
                    </span><span class="errortips"><span style="display: none; color: red" id="rfvSpecialityMemo"
                        class="validstyle">请输入详细描述</span></span> <span class="zstips"></span>
                </div>
            </div>
        </div>
    </div>
    <div class="bsbutton">
        <div>
            <input type="submit" name="btnSave" value="确认保存" id="btnSave" />
        </div>
    </div>
    </div>
    <% } %>
</asp:Content>
